In message-based communication, some applications act as “clients”, and some act as a “service”. One type of software application is often termed a “service”. In a typical client-service model, the client is an application that initiates communication with services (often over a network). A service is an application that waits for clients to communicate with them, and responds to messages received from clients. A single application can serve as both a client and a service. Often, services are incorporated in a “runtime”, which provides underlying functionality that can be used by multiple applications that run on that computing system.
In a client-service system, messages are sent between endpoints. Endpoints are places where messages are sent or received (or both), and they define all the information required for the message exchange. A service exposes one or more endpoints, and the client generates an endpoint that is compatible with one of the service's endpoints. An endpoint describes in a standard-based way where messages should be sent, how they should be sent, and what the messages should look like. Multiple clients may communicate with a single endpoint.
Each service has a message exchange contract that describes a particular message exchange in terms of the ordering of messages, the dependencies of messages, whether the message is in-bound or out-bound, the structure of the message, and so forth.
Services can actually be quite complex, and can be constructed declaratively without using imperative code. For example, Web Services Description Language (WSDL) is an eXternsible Markup Language for describing network services as a set of endpoints operating upon document-oriented or procedure-oriented information. The operations and messages are described abstractly, and then bound to a concrete network protocol and message format to define an endpoint. Related concrete endpoints are combined into abstract endpoints (services).